# -*- coding: utf-8 -*-
# flake8: noqa
import requests

from qiniu import Auth

access_key = 'xHivd5Lyb6nXA_lhveXeXp67CuEjQ3XfMmE13e2B'
secret_key = 'SF2HW7aoDyjB5t0PfBxlMFu6dHGRVw70Hde3iFMh'
q = Auth(access_key, secret_key)
bucket_domain = 'qiniu.didowatch.com'
key = 'Kneeling_Hand_Release_Push-Up.m3u8'
base_url = 'http://%s/%s?pm3u8/0' % (bucket_domain, key)

private_url = q.private_download_url(base_url, expires=3600)
print(private_url)
r = requests.get(private_url)
print(r)
# assert r.status_code == 200
